<?php
/**
 * Conversations - A lightweight BB for Xaraya
 *
 * @package modules
 * @copyright (C) 2003-2006 The Digital Development Foundation.
 * @license GPL {@link http://www.gnu.org/licenses/gpl.html}
 * @link http://www.xaraya.com
 *
 * @subpackage conversations
 * @link http://xaraya.com/index.php/release/760.html
 * @author John Cox
*/
/**
 * Delete a tag
 * 
 * @package Xaraya eXtensible Management System
 * @copyright (C) 2005 by the Xaraya Development Team.
 * @license GPL {@link http://www.gnu.org/licenses/gpl.html}
 * @link http://www.xaraya.org
*/
/**
 * delete a tag
 * @param $args['tagid'] integer
 * @returns bool
 * @return true on success, false on failure
 */
function conversations_user_delete_tag($args)
{
    extract($args);
    // Get parameters
    if (!xarVarFetch('tagid', 'int:1:', $tagid)) return;
    // Security Check
    if (!xarSecurityCheck('Deletecon', 1)) return;
    // Confirm authorisation code.
    if (!xarSecConfirmAuthKey()) return;
    // Delete it
    if (!xarModAPIFunc('conversations', 'user', 'deletetag', array('id' => $tagid))) return;
    // Redirect
    xarResponseRedirect(xarModURL('conversations', 'user', 'main'));
    // Return
    return true;
}
?>